﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sunfish.ePubBuilder
{
    public class epb
    {
        public string BookName, BookSN, BookAuthor, BookPublisher, BookContributor, BookRights,BookDescription;

        public string get_content_opf()
        {
            string template = "<?xml version=\"1.0\"  encoding=\"UTF-8\"?><package xmlns=\"http://www.idpf.org/2007/opf\" version=\"2.0\" unique-identifier=\"PrimaryID\"><metadata xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:opf=\"http://www.idpf.org/2007/opf\"><dc:creator opf:role=\"aut\" opf:file-as=\"{0}\">{0}</dc:creator><dc:title>{1}</dc:title><dc:identifier opf:scheme=\"ISBN\"/><dc:language>zh-CN</dc:language><dc:publisher>{2}</dc:publisher<dc:description>{3}</dc:description><dc:coverage/><dc:date>{4}</dc:date><dc:rights>{5}</dc:rights><dc:contributor/><dc:type></dc:type><dc:format/><dc:relation/><dc:builder>Sunfish ePub Builder</dc:builder>";
            return string.Format(template, new string[] { 
            BookAuthor,
            BookName,
            BookPublisher,
            BookDescription,
            DateTime.Now.ToString("yyyyMMdd HH:mm:ss")+"08:00",
            BookRights
            });
        }




    }
}
